<?php

$num1 = mt_rand(1, 5);
$num2 = mt_rand(1, 5);

echo $num1.$num2;
$operators = array(
    "+",
    "-",
   
);
$d= array_rand($operators);
switch ($operators[$d]) {
    case "+":
        $result = $num1 + $num2;
		case
        break;
    case "-":
        $result = $num1 - $num2;
        break;
    case "*":
        $result = $num1 * $num2;
        break;
    case "/":
        $result = $num1 / $num2;
        break;
}

echo $result;
?>
<form id="form1" name="form1" method="post" action="simpan_jawaban.php">